package com.yantong.mapper;

import com.yantong.pojo.ShipcardRecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface ShipcardRecordMapper {
 


    /**
     * 主键删除
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Long id);


    /**
     * 适配插入
     * @param record
     * @return
     */
    int insertSelective(ShipcardRecord record);

    /**
     * 条件查询
     * @param example
     * @return
     */
    List<ShipcardRecord> list(ShipcardRecord record, RowBounds rowBounds);


    /**
     * 获取详情
     * @param id
     * @return
     */
    ShipcardRecord selectByPrimaryKey(Long id);


    /**
     * 总页数
     * @param record
     * @return
     */
   int getTotal(ShipcardRecord record);

   /**
    * 修改
    * @param record
    * @return
    */
   int updateByPrimaryKeySelective(ShipcardRecord record);

	/**
	 * 得到详情
	 * @param record
	 * @return
	 */
   ShipcardRecord selectByPrimaryKey(ShipcardRecord record);

   /**
    * 得到会员卡详情
    * @param record
    * @return
    */
   List<ShipcardRecord> getShipcardByMid(ShipcardRecord record);

   /**
    * 充值卡
    * @param mid
    * @param money
    * @return
    */
   int rechargeBalance(@Param("id") Long id, @Param("money") Double money);

   /**
    * 得到充值卡定时任务数据
    * @return
    */
   List<ShipcardRecord> getTaskList();

   /**
    * 得到会员卡购买详情
    * @param record
    * @return
    */
   List<ShipcardRecord> getShipcardById(ShipcardRecord record, RowBounds rowBounds);
   
   /**
    * 购买卡用户购买记录总页数
    * @param record
    * @return
    */
  int getShipcardRecordTotal(ShipcardRecord record);
}